package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;
import java.util.Map;

@AllArgsConstructor
@NoArgsConstructor
@ToString
@Getter
@Setter
public class Department {
    private Long id;
    private String name;
    private String sn;
    Map<String,Object> hashMap = new HashMap<>();
    public String getJson(){
        hashMap.put("id",id);
        hashMap.put("name",name);
        hashMap.put("sn",sn);
        // 使用 fastJson 将 json 格式的数据转成 String
        return JSON.toJSONString(hashMap);
    }


}